Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed delimiter from : to :: #43

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Changed delimiter from : to :: #43

merged 1 commit into from
Mar 29, 2023

Conversation

cooffeeRequired
Copy link
Owner

Test file

{
    "URL" : {
        "https://www.google.com": false
    },
    "Minecraft schema" : {
        "minecraft:jump": 9
    },
    "Normal object" : {
        "allow": true,
        "array": [],
        "object": {}
    },
    "Full schema" : {
        "object": {
            "title": "This gonna be full .)",
            "Description": "Easy to test that"
        }
    }
}

Code

command test:
    trigger:
        set {_JSON} to json from file "plugins/raw/raw.json"
        set {_result} to true

        loop entries of {_JSON}:
            if loop-element is not set:
                set {_result} to false
            else if loop-key is not set:
                set {_result} to false

        set {_r} to "&aPassed" if {_result} is true, else "&cFailed"
        send "&f&lParsing test with nestedKeys (URL|MINECRAFT|DEFAULT) was %{_r}%"

@cooffeeRequired cooffeeRequired added enhancement New feature or request Added 2.8.0 labels Mar 29, 2023
@cooffeeRequired cooffeeRequired added this to the 2.8.0 milestone Mar 29, 2023
@cooffeeRequired cooffeeRequired merged commit f019e40 into main Mar 29, 2023
@cooffeeRequired cooffeeRequired deleted the fix-038-delimiter branch March 29, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8.0 Added enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant